package com.origin.onlinesys.service.modules.finance.impl;

import com.origin.onlinesys.common.services.BaseService;
import com.origin.onlinesys.domain.modules.finance.FinanceCount;
import com.origin.onlinesys.persistence.modules.finance.FinanceCountMapper;
import com.origin.onlinesys.service.modules.finance.IFinanceCountService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by origin on 15-3-20.
 * 财务统计
 */
@Service
public class FinanceCountServiceImpl extends BaseService<FinanceCount> implements IFinanceCountService{
    @Override
    public FinanceCount selectFinanceCount(String id) {
        return ((FinanceCountMapper)mapper).selectFinanceCount(id);
    }

    @Override
    public String checkZoneHave(String zoneId) {
        return ((FinanceCountMapper)mapper).checkZoneHave(zoneId);
    }

    @Override
    public int updateFinanceCount(String left, String money, String zoneId) {
        Map map = new HashMap();map.put("left",left);map.put("money",money);
        map.put("zoneId",zoneId);
        ((FinanceCountMapper)mapper).updateFinanceCount(map);
        return 1;
    }
}
